using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public partial class MainMgr : SingleMono<MainMgr>
{

    public MonsterBehaviour CreateMonster(int id = -1)
    {
        if (id == -1)return null;
        var monster = ObjectPoolManager.Instance.DePool<MonsterBehaviour>("Dice", false, "Common");
        monster.InitSetting(id);
        return monster;
    }


    #region UI
    public void OpenUISettingPanel()
    {
      UISettingPanel panel =  UIManager.Instance.OpenPlane<UISettingPanel>(0);

    }

    #endregion

    #region Sound 
    public void SetMute(SoundStyle soundStyle, bool isMute)
    {
        SoundManager.Instance.SetMute(soundStyle,isMute);
    }
    public void SetVolum(SoundStyle soundStyle, float volum)
    {
        SoundManager.Instance.SetVolum(soundStyle, volum);
    }
    public bool GetMute(SoundStyle soundStyle)
    {
        return SoundManager.Instance.SoundTrack[soundStyle].IsMute;
    }
    public float GetVolum(SoundStyle soundStyle)
    {
        return SoundManager.Instance.SoundTrack[soundStyle].Volum;
    }
    #endregion

}



